<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>
<div id="top_login">
 <script type="text/javascript">
    //刷新验证码
    function changeImg(){
        document.getElementById("validateCodeImg").src="CheckCodeServlet?"+Math.random();
    }
    </script>
			<c:choose>
				<c:when test="${not empty ADMIN}">欢迎管理员${ADMIN.uname}&#160;&#160;&#160;&#160;
				 <a href="LoginOutServlet">退出登录</a>&#160;&#160;&#160;&#160;<a href="AdminServlet">进入编辑界面</a>
				 <a style="margin-left:10px" href="index.jsp">进入首页</a>
				</c:when>
				<c:otherwise>
					<form action="LoginPartionServlet" method="post" onsubmit="return check()">
						<label> 登录名 </label><input  style="width:80px" type="text" name="uname" id="uname" value="${ADMIN.uname}" class="login_input" />
						<label>密&#160;&#160;码 </label><input  style="width:80px" type="password" name="upwd" id="upwd" value="${ADMIN.upwd}" class="login_input" /> 
						<label>验证码</label>
						<img style="width:100px;height:20px" id="validateCodeImg" src="CheckCodeServlet" alt="验证码" />
						<a href="javascript:void(0)" onclick="changeImg()">看不清，换一张</a>
						<input  style="width:80px" type="text" name="checkCode" />
						<input type="checkbox" name="keep" value="1" />
						<label>记住我的登录状态</label><input type="submit" class="login_sub" value="登录" /> 
						<label id="error"></label><img src="news/images/friend_logo.gif" alt="Google" id="friend_logo" />
						<a style="margin-left:10px" href="index.jsp">进入首页</a>
					</form>
					
				</c:otherwise>
			</c:choose> 
			
		</div>
	 <div id="nav">
			<div id="logo">
				<img src="news/images/logo.jpg" alt="新闻中国" />
			</div>
			<div id="a_b01">
				<img src="news/images/a_b01.gif" alt="" />
			</div>
	</div> 